//第一步:引用Node.js自带的HTTP模块并实例化
var http = require("http");

//第二步:创建http服务器
http.createServer(function(request,response){
	//发送HTTP头部,HTTP状态值：200：OK,内容类型：text/plain
	response.writeHead(200, {'Content-Type': 'text/plain'});
	
	//发送响应数据
	response.end("Hello World\n");
}).listen(8888);


//访问终端响应信息打印
console.log("Server running at http://127.0.0.1:8888/");